<?php
   require_once 'error_config.php' ;
   class CSqlResult
   {
	  private $m_result ;

	  function __construct( $result )
	  {
		 $this->SetResult( $result ) ;
	  }

	  function __destruct()
	  {
		 $this->UnSetResult() ;
	  }

	  function SetResult( $result )
	  {
		 $this->UnSetResult() ;
		 $this->m_result =$result ; 
	  }

	  function UnSetResult()
	  {
		 if( $this->m_result )
		 {
			$this->m_result->free() ;
		 }

		 unset( $this->m_result ) ;
	  }

	  function GetObj()
	  {
		 return $this->m_result->fetch_object() ;
	  }

	  function GetRow()
	  {
		 return $this->m_result->fetch_row() ;
	  }
   }
	  
?>
